package o;

import java.util.ArrayList;
import o.el.c;

public class em {
    protected el ʻ;
    private boolean ʻॱ = false;
    protected int ʼ;
    protected int ʽ;
    protected el ˊ;
    protected boolean ˊॱ;
    protected el ˋ;
    protected boolean ˋॱ;
    protected el ˎ;
    protected el ˏ;
    private int ˏॱ;
    protected float ͺ = 0.0f;
    protected el ॱ;
    protected boolean ॱˊ;
    private boolean ॱˎ;
    protected ArrayList<el> ॱॱ;
    protected el ᐝ;

    public em(el elVar, int i, boolean z) {
        this.ॱ = elVar;
        this.ˏॱ = i;
        this.ʻॱ = z;
    }

    private static boolean ॱ(el elVar, int i) {
        return elVar.ˊॱ() != 8 && elVar.ˉ[i] == c.MATCH_CONSTRAINT && (elVar.ᐝ[i] == 0 || elVar.ᐝ[i] == 3);
    }

    private void ˏ() {
        boolean z = true;
        int i = this.ˏॱ * 2;
        el elVar = this.ॱ;
        el elVar2 = this.ॱ;
        el elVar3 = this.ॱ;
        elVar3 = elVar;
        boolean z2 = false;
        while (!z2) {
            this.ʽ++;
            elVar2.ʹ[this.ˏॱ] = null;
            elVar2.ﾟ[this.ˏॱ] = null;
            if (elVar2.ˊॱ() != 8) {
                if (this.ˎ == null) {
                    this.ˎ = elVar2;
                }
                this.ˋ = elVar2;
                if (elVar2.ˉ[this.ˏॱ] == c.MATCH_CONSTRAINT && (elVar2.ᐝ[this.ˏॱ] == 0 || elVar2.ᐝ[this.ˏॱ] == 3 || elVar2.ᐝ[this.ˏॱ] == 2)) {
                    this.ʼ++;
                    float f = elVar2.ﹳ[this.ˏॱ];
                    if (f > 0.0f) {
                        this.ͺ += elVar2.ﹳ[this.ˏॱ];
                    }
                    if (ॱ(elVar2, this.ˏॱ)) {
                        if (f < 0.0f) {
                            this.ˋॱ = true;
                        } else {
                            this.ˊॱ = true;
                        }
                        if (this.ॱॱ == null) {
                            this.ॱॱ = new ArrayList();
                        }
                        this.ॱॱ.add(elVar2);
                    }
                    if (this.ʻ == null) {
                        this.ʻ = elVar2;
                    }
                    if (this.ᐝ != null) {
                        this.ᐝ.ﾟ[this.ˏॱ] = elVar2;
                    }
                    this.ᐝ = elVar2;
                }
            }
            if (elVar3 != elVar2) {
                elVar3.ʹ[this.ˏॱ] = elVar2;
            }
            eo eoVar = elVar2.ˋˊ[i + 1].ˋ;
            if (eoVar != null) {
                elVar3 = eoVar.ˎ;
                if (elVar3.ˋˊ[i].ˋ == null || elVar3.ˋˊ[i].ˋ.ˎ != elVar2) {
                    elVar3 = null;
                }
            } else {
                elVar3 = null;
            }
            if (elVar3 == null) {
                z2 = true;
                elVar3 = elVar2;
            }
            el elVar4 = elVar3;
            elVar3 = elVar2;
            elVar2 = elVar4;
        }
        this.ˊ = elVar2;
        if (this.ˏॱ == 0 && this.ʻॱ) {
            this.ˏ = this.ˊ;
        } else {
            this.ˏ = this.ॱ;
        }
        if (!(this.ˊॱ && this.ˋॱ)) {
            z = false;
        }
        this.ॱˊ = z;
    }

    public void ˋ() {
        if (!this.ॱˎ) {
            ˏ();
        }
        this.ॱˎ = true;
    }
}
